#include "StdAfx.h"
#include "Patch.h"
#include "Shell32Hook.h"
#include "WMPHook.h"

#pragma unmanaged

void* SelectShell32Method(int num) {
	void* proc = shell32Hook[num];
	if (!proc) {
		proc = shell32Save[num];
	}
	return proc;
}

HRESULT WINAPI SHOpenFolderAndSelectItemsHook(PCIDLIST_ABSOLUTE pidlFolder, UINT cidl, PCUITEMID_CHILD_ARRAY apidl, DWORD dwFlags) {
	SyncFuncHook(HRESULT, PSHOpenFolderAndSelectItems, SelectShell32Method(0), (pidlFolder, cidl, apidl, dwFlags));
}
